package com.yu.controller;

import com.yu.pojo.Emp;
import com.yu.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Autowired
    private EmpService empService;

    @PostMapping("/login")
    public String login(@RequestBody Emp emp){
        System.out.println("emp = " + emp);
        String result = empService.login(emp);
        return result;
    }
}
